//SayingItem.qml
import QtQuick 2.15
import QtQuick.Controls 2.15
import QtQuick.Layouts 1.15
import org.ukui.saying 1.0

Rectangle {
    implicitWidth: 500
    implicitHeight: 40
    radius: 6
    color: Qt.rgba(255, 255, 255, 0.5)
    border.color: "black"

    Saying {
        id: saying
    }

    Button {
        id: refresh
        width: 40
        height: 30
        font.pointSize: 6
        anchors.right: parent.right
        anchors.leftMargin: 3
        anchors.rightMargin: 3
        anchors.verticalCenter: parent.verticalCenter
        text: "换一句"
        onClicked: {
            text.text = saying.getSaying
        }
    }

    Text {
        id: text
        anchors.centerIn: parent
        text: saying.getSaying
        font.pointSize: 9
    }


}